//
//  XBXJ_LazyDeinit_DemoVC.swift
//  APSwift
//
//  Created by jianbo.pei on 2023/9/9.
//

import UIKit

class XBXJ_LazyDeinit_DemoVC: UIViewController {

    private var timer: Timer?
    
    deinit {
        timer?.invalidate()
        timer = nil
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        timer = Timer.scheduledTimer(withTimeInterval: 2, repeats: true) { _ in
            debugPrint("2s执行一次 self is \(self)")
        }
    }
    

}
